<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition template="_setor.xhtml">
	<ui:define name="corpo"><br />

		<div id="conteudo">

			<h:form id="form">

				<h2>
					<h:outputText value="CADASTRAR BLOCO" />
				</h2>
				<hr /><br />
				
				<p:messages id="msg" />
				
				<p:fieldset legend="Dados do Bloco">
				
				<h:panelGrid columns="3">
				
				<h:outputLabel value="Nome: " for="nome" />
				<p:inputText id="nome" value="#{blocoBean.bloco.nome}" required="true" requiredMessage="Preencha o campo Bloco" style="width: 300px;">
					<f:ajax event="change" />
				</p:inputText><br /><br /><br />
				
					
				<h:outputLabel value="Sigla: " for="sigla" />
				<p:inputText id="sigla" value="#{blocoBean.bloco.sigla}" required="true" requiredMessage="Preencha o campo Sigla" style="width: 300px;">
					<f:ajax event="change" />
				</p:inputText><br /><br /><br />

				<p:commandButton id="grava" value="GRAVAR" action="#{blocoBean.grava}" ajax="false" image="ui-icon-disk">
					<f:ajax render="@all" />
				</p:commandButton>	

				<p:button id="reset" type="reset" value="LIMPAR"  />
				
				</h:panelGrid>
							
				</p:fieldset>
								
				</h:form>
				
			</div>	
		</ui:define>
</ui:composition>
</html>